package com.example.ojcodesandbox.controller;

import com.example.ojcommon.common.ExecuteCodeRequest;
import com.example.ojcommon.common.ExecuteCodeResponse;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class APIController {

  // 定义鉴权请求头和密钥
  public static final String AUTH_REQUEST_HEADER = "auth";

  public static final String AUTH_REQUEST_SECRET = "secretKey";


  @RequestMapping("/executeCode")
  public ExecuteCodeResponse executeCode(@RequestBody ExecuteCodeRequest executeCodeRequest,
                                         HttpServletRequest request, HttpServletResponse response) {
    return null;
  }

}
